package com.maozzi.common.model;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 分页参数
 *
 * @author maozi
 */
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class PageParam {
    private final static Integer MAX_PAGE_SIZE = 200;

    private Integer page;
    private Integer pageSize;

    public Integer getPage() {
        return page;
    }

    public Integer getPageSize() {
        return pageSize > MAX_PAGE_SIZE ? MAX_PAGE_SIZE : pageSize;
    }
}
